package com.ht.medicaltreatment.adapter

import android.view.View
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.ht.medicaltreatment.R
import com.ht.medicaltreatment.bean.YangBenJieShouBeanRfidSample

class ReceiveListAdapter(isStanding:Boolean):BaseQuickAdapter<YangBenJieShouBeanRfidSample,BaseViewHolder>(R.layout.item_receive_list_layout) {
    var isStanding = isStanding
    override fun convert(holder: BaseViewHolder, item: YangBenJieShouBeanRfidSample) {
        holder.setText(R.id.titleX,"${getItemPosition(item)+1}")
        holder.setText(R.id.titleL,item.name)
        holder.setText(R.id.titleL1,item.samplingTime)
        val standing = holder.getView<TextView>(R.id.titleJ)
        if(isStanding){
            standing.visibility = View.VISIBLE
            standing.setText(item.standingTime)
        }else{
            standing.visibility = View.GONE
        }
    }

}
